home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / live_surface.pro < prev    next >
Text File  |  1997-07-08  |  2KB  |  84 lines

  1. ; $Id: live_surface.pro,v 1.5 1997/04/16 20:20:47 billo Exp $
  2. ;
  3. ; Copyright (c) 1996-1997, Research Systems, Inc.  All rights reserved.
  4. ;       Unauthorized reproduction prohibited.
  5. ;
  6. ;+
  7. ; NAME:
  8. ;       LIVE_SURFACE
  9. ;
  10. ; PURPOSE:
  11. ;       Entry point to LIVE_SURFACE
  12. ;
  13. ; CALLING SEQUENCE:
  14. ;       LIVE_SURFACE, z
  15. ;
  16. ; OPTIONAL KEYWORDS:
  17. ;    XINDEPENDENT=x               ; The independent vector/array [optional]
  18. ;    YINDEPENDENT=y               ; The independent vector/array [optional]
  19. ;    STYLE=style                   ; A style name (string) [optional]
  20. ;   INDEXED_COLOR=indexedColor ; Set to use indexed color [optional]
  21. ;
  22. ; DEVELOPMENT NOTES:
  23. ;        -
  24. ;
  25. ;------------------------------------------------------------------------------
  26. pro Live_Surface, z, _EXTRA=extra
  27.  
  28.     ON_ERROR, 2
  29.  
  30.     WIDGET_CONTROL, /HOURGLASS
  31.  
  32.     ; Determine if the L_SURFACE routine has been resolved
  33.     ;
  34.     result = ROUTINE_INFO(/UNRESOLVED)
  35.  
  36.     void = WHERE(result eq 'L_SURFACE', count)
  37.  
  38.     ; If the L_SURFACE routine has not been resolved find insight.sav
  39.     ; and restore it.
  40.     ;
  41.     if (count ne 0) then begin
  42.  
  43.         ; Look for insight in its default location idlxx/lib/hook
  44.         ;
  45.         insightPath = FILEPATH('insight.sav', SUBDIR=['lib','hook'])
  46.         void = FINDFILE(insightPath, COUNT=count)
  47.  
  48.         ; If it wasn't found, notify the user.
  49.         ;
  50.         if (count eq 0) then begin
  51.  
  52.             result = DIALOG_MESSAGE($
  53.                 ['Insight was not found.',$
  54.                 'Please make sure insight.sav is in your hook directory', $
  55.                 'and !DIR points to your IDL directory.', $
  56.                 'Do you wish to locate insight.sav?'], /CANCEL)
  57.  
  58.             ; If they want to search for it, display std file dialog.
  59.             ;
  60.             if (result eq 'OK') then begin
  61.  
  62.                 insightPath = $
  63.                     DIALOG_PICKFILE(TITLE='PLease locate insight.sav', $
  64.                         /MUST_EXIST)
  65.  
  66.                 if (insightPath eq '') then $
  67.                     return
  68.  
  69.             endif else $
  70.                 return
  71.  
  72.         endif
  73.  
  74.         ; Restore L_SURFACE code
  75.         ;
  76.         restore, insightPath
  77.     endif
  78.  
  79.     ; Call L_SURFACE with passed in parameters
  80.     ;
  81.     L_SURFACE, z, _EXTRA=extra
  82.  
  83. end
  84.